<?php
namespace app\home\validate;

use think\Validate;

class Index extends Validate
{
    protected $rule = [
        'password'         => 'confirm:confirm_password',
        'confirm_password' => 'confirm:password',
        'mobile'           => 'number|length:11',
    ];

    protected $message = [
        'password.confirm'         => '两次输入密码不一致',
        'confirm_password.confirm' => '两次输入密码不一致',
        'mobile.number'            => '手机号格式错误',
        'mobile.length'            => '手机号长度错误',
    ];
}